package cn.cocho.android.mct.comp.button;

import cn.cocho.android.mct.R;
import cn.cocho.android.mc.activity.ActivityUtils;
import cn.cocho.android.mc.activity.BaseActivity;
import cn.cocho.android.mc.comp.button.SlipButton;
import cn.cocho.android.mc.comp.button.SlipButton.OnChangedListener;


public class SlipButtonTest extends BaseActivity {

	@Override
	public void init() {
		setContentView(R.layout.slip_btn);

		SlipButton myBtn =(SlipButton) findViewById(R.id.slipButton1);//获得指定控件
		myBtn.setNowChoose(true);
		myBtn.SetOnChangedListener(new OnChangedListener() {
			public void OnChanged(boolean CheckState) {
				if(CheckState){
					ActivityUtils.showShortMessage("开");
				}else{
					ActivityUtils.showShortMessage("关");
				}
			}
		});
	}
}
